import 'package:get/get.dart';

class RouteManager {
  //跳转及保留当前页面
  static void to(String url, {Map<String, String>? mParams}) {
    Get.toNamed(url, parameters: mParams);
  }

  //跳转并关闭当前页面
  static void off(String url, {Map<String, String>? mParams}) {
    Get.offNamed(url, parameters: mParams);
  }

  //跳转并关闭此前的全部页面
  static void offAll(String url, {Map<String, String>? mParams}) {
    Get.offAllNamed(url, parameters: mParams);
  }

  static void back() {
    Get.back();
  }

  static String getAppScheme() {
    return "blackcoslove://com.black.coslove/";
  }

  static String getAppHttpScheme() {
    return "https://test-api.xingyunxcx.com/";
  }
}
